/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.uccart_project.model;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;

@Entity
@Table(name = "cobro")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Cobro.findAll", query = "SELECT c FROM Cobro c"),
    @NamedQuery(name = "Cobro.findByCobroId", query = "SELECT c FROM Cobro c WHERE c.cobroId = :cobroId"),
    @NamedQuery(name = "Cobro.findByCobroMonto", query = "SELECT c FROM Cobro c WHERE c.cobroMonto = :cobroMonto"),
    @NamedQuery(name = "Cobro.findByCorboLetra", query = "SELECT c FROM Cobro c WHERE c.corboLetra = :corboLetra"),
    @NamedQuery(name = "Cobro.findByCobroFechapago", query = "SELECT c FROM Cobro c WHERE c.cobroFechapago = :cobroFechapago"),
    @NamedQuery(name = "Cobro.findByCobroVencimiento", query = "SELECT c FROM Cobro c WHERE c.cobroVencimiento = :cobroVencimiento"),
    @NamedQuery(name = "Cobro.findByCobroStatus", query = "SELECT c FROM Cobro c WHERE c.cobroStatus = :cobroStatus"),
    @NamedQuery(name = "Cobro.findByCobroInteres", query = "SELECT c FROM Cobro c WHERE c.cobroInteres = :cobroInteres"),
    @NamedQuery(name = "Cobro.findByCobroDetalle", query = "SELECT c FROM Cobro c WHERE c.cobroDetalle = :cobroDetalle")})
public class Cobro implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "cobro_id")
    private Integer cobroId;
    @Basic(optional = false)
    @Column(name = "cobro_monto")
    private float cobroMonto;
    @Column(name = "corbo_letra")
    private Integer corboLetra;
    @Column(name = "cobro_fechapago")
    @Temporal(TemporalType.DATE)
    private Date cobroFechapago;
    @Column(name = "cobro_vencimiento")
    @Temporal(TemporalType.DATE)
    private Date cobroVencimiento;
    @Column(name = "cobro_status")
    private Boolean cobroStatus;
    @Column(name = "cobro_interes")
    private Integer cobroInteres;
    @Column(name = "cobro_detalle")
    private String cobroDetalle;
    @JoinColumn(name = "cobro_codestudiante", referencedColumnName = "est_id")
    @ManyToOne(optional = false)
    private Estudiante cobroCodestudiante;

    public Cobro() {
    }

    public Cobro(Integer cobroId) {
        this.cobroId = cobroId;
    }

    public Cobro(Integer cobroId, float cobroMonto) {
        this.cobroId = cobroId;
        this.cobroMonto = cobroMonto;
    }

    public Integer getCobroId() {
        return cobroId;
    }

    public void setCobroId(Integer cobroId) {
        this.cobroId = cobroId;
    }

    public float getCobroMonto() {
        return cobroMonto;
    }

    public void setCobroMonto(float cobroMonto) {
        this.cobroMonto = cobroMonto;
    }

    public Integer getCorboLetra() {
        return corboLetra;
    }

    public void setCorboLetra(Integer corboLetra) {
        this.corboLetra = corboLetra;
    }

    public Date getCobroFechapago() {
        return cobroFechapago;
    }

    public void setCobroFechapago(Date cobroFechapago) {
        this.cobroFechapago = cobroFechapago;
    }

    public Date getCobroVencimiento() {
        return cobroVencimiento;
    }

    public void setCobroVencimiento(Date cobroVencimiento) {
        this.cobroVencimiento = cobroVencimiento;
    }

    public Boolean getCobroStatus() {
        return cobroStatus;
    }

    public void setCobroStatus(Boolean cobroStatus) {
        this.cobroStatus = cobroStatus;
    }

    public Integer getCobroInteres() {
        return cobroInteres;
    }

    public void setCobroInteres(Integer cobroInteres) {
        this.cobroInteres = cobroInteres;
    }

    public String getCobroDetalle() {
        return cobroDetalle;
    }

    public void setCobroDetalle(String cobroDetalle) {
        this.cobroDetalle = cobroDetalle;
    }

    public Estudiante getCobroCodestudiante() {
        return cobroCodestudiante;
    }

    public void setCobroCodestudiante(Estudiante cobroCodestudiante) {
        this.cobroCodestudiante = cobroCodestudiante;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (cobroId != null ? cobroId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Cobro)) {
            return false;
        }
        Cobro other = (Cobro) object;
        if ((this.cobroId == null && other.cobroId != null) || (this.cobroId != null && !this.cobroId.equals(other.cobroId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.uccart_project.model.Cobro[ cobroId=" + cobroId + " ]";
    }
    
}
